# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libqtolm
pkgver=3.0.1
pkgrel=1
arch="all"
url="https://gitlab.com/b0/libQtOlm"
pkgdesc="A Qt wrapper for libolm"
license="GPL-3.0-or-later"
depends_dev="qt5-qtbase-dev olm-dev"
makedepends="$depends_dev cmake"
source="https://gitlab.com/b0/libQtOlm/-/archive/v$pkgver/libqtolm-v$pkgver.tar.gz"
subpackages="$pkgname-dev"
options="!check" # No tests
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=true
	make -C build
}

package() {
	DESTDIR="$pkgdir" make -C build install
}

sha512sums="98ee8f1a9f69e6e78105e9deb651d276de79678f749d43ae506295d59500617ce517338894a96a163e6d2de901413d6200bb788b507a6ad9179e1cbdc682a858  libqtolm-v3.0.1.tar.gz"
